package com.intertech.activity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;

public class GolfAndroidActivity extends Activity {

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main);
//		ActionBar bar = getActionBar();
//		bar.hide();
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		MenuInflater inflater = getMenuInflater();
		inflater.inflate(R.menu.options, menu);
		return true;
	}

	public boolean onPrepareOptionsMenu(Menu menu) {
		Log.i("GolfAndroidActivity", "In on prepare option");
		return super.onPrepareOptionsMenu(menu);
	}

	@Override
	public boolean onOptionsItemSelected(MenuItem item) {
		if (item.getItemId() == R.id.courses) {
			startActivity(new Intent(this, CoursesActivity.class));
		}
		if (item.getItemId() == R.id.scores) {
			startActivity(new Intent(this, ScoresActivity.class));
		}
		if (item.getItemId() == R.id.handicap) {
			startActivity(new Intent(this, HandicapActivity.class));
		}
		return super.onOptionsItemSelected(item);
	}

}